package com.cy.pojo;

import com.cy.util.BigDecimalUtil;

/**
 * Created by Administrator on 2017/8/24.
 */
public class PushRecordPojo {

    private String ex;

    private String coin;

    private String defaultAve;

    private String nowAve;



    public boolean isPush(String sum){
        if (BigDecimalUtil.isBig(sum, nowAve) >= 0){
            nowAve = BigDecimalUtil.mul(nowAve, "1.25");
            return true;
        } else {
            if (BigDecimalUtil.isBig(sum, defaultAve) < 0){
                nowAve = defaultAve;
            }
            return false;
        }
    }

    public PushRecordPojo(String defaultAve) {
        this.defaultAve = defaultAve;
        if (nowAve == null || "".equals(nowAve))
            nowAve = defaultAve;
    }

    public String getEx() {
        return ex;
    }

    public void setEx(String ex) {
        this.ex = ex;
    }

    public String getCoin() {
        return coin;
    }

    public void setCoin(String coin) {
        this.coin = coin;
    }
}
